import request from '@/utils/request'
import { getServicePath } from '@/api/baseUrlConfig'
const servicePath = getServicePath()

// 查询党内职位
export function queryByCondition (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/party-positions/queryByCondition',
    method: 'get',
    params: data
  })
}

// 新增党内职位
export function add (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/party-positions/add',
    method: 'post',
    data
  })
}

// 编辑党内职位
export function edit (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/party-positions/edit',
    method: 'post',
    data
  })
}

// 删除党内职位
export function deleteById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/party-positions/deleteById/${data.id}`,
    method: 'get',
    params: data
  })
}
